<?php
	// URLのパラメータを維持する
	// http://book.cakephp.org/view/166/Pagination-in-Views
	$sanitizedGetVal = intval($this->params['named']['col_id']);
	$this->passedArgs = "col_id:{$sanitizedGetVal}";
	$paginator->options(array('url' => $this->passedArgs));
?>

<?php echo $form->create(null, array('url' => array('controller' => 'exports', 'action' => 'export', "col_id:{$sanitizedGetVal}"))); ?>

<div class="pageContents ledaResolvers index">

<h2>"<?php echo $name ?>"のアイテム一覧</h2>

<h3>検索結果: <?php echo $paginator->counter( array( 'format' => __('%count%', true) ) ); ?>件</h3>

<p class="message">リストの見出しをクリックすると並び替えができます</p>

<?php //echo "<table id="profileTable" class="miscTable table-pager" align="center" width="90%">" ?>
<table id="profileTable" class="miscTable table-pager" align="center" width="90%">
<thead>
<tr>
	<th width="5%">全選択<br /><input type="checkbox" id="allCheck"></th>
	<th width="10%">発行</th>
	<th>タイトル</th>
	<th width="20%">著者</th>
	<th width="25%">掲載誌</th>
</tr>
</thead>
<?php foreach ($ledaCollections as $ledaCollection): ?>
	<tr>
		<td class="centerAlign"><?php echo $form->checkbox('id', array('class' => 'check', 'id' => "LedaCollectionId{$ledaCollection['LedaCollection']['id']}", 'name' => "data[LedaCollection][id][{$ledaCollection['LedaCollection']['id']}]" ) ); ?></td>
		<td class="leftAlign"><?php echo $ledaCollection['LedaCollection']['date_issued']; ?></td>
		<td class="leftAlign"><!-- <?php echo $ledaCollection['LedaCollection']['title']; ?> --><strong><a href="<?php echo $ledaCollection['LedaCollection']['uri']; ?>"><?php echo $ledaCollection['LedaCollection']['title']; ?></a></strong></td>
		<td class="leftAlign">
			<?php foreach( $ledaCollection['Itemsbyauthor'] as $key => $value ) : ?>
				<?php echo $value['author']; ?>
			<?php endforeach; ?>
		</td>
		<td class="leftAlign">
			<!-- <?php echo $ledaCollection['LedaCollection']['sort']; ?> -->
			<small>
				<div style="float:left; width: 50%; padding: 0px 2px;">
					<strong>掲載誌名:</strong> <?php echo $ledaCollection['LedaCollection']['identifier_title']; ?><br />
					<strong>掲載誌巻:</strong> <?php echo $ledaCollection['LedaCollection']['identifier_volume']; ?><br />
					<strong>掲載誌号:</strong> <?php echo $ledaCollection['LedaCollection']['identifier_number']; ?>
				</div>
				<div style="float:left">
					<strong>開始ページ:</strong> <?php echo $ledaCollection['LedaCollection']['identifier_spage']; ?><br />
					<strong>終了ページ:</strong> <?php echo $ledaCollection['LedaCollection']['identifier_epage']; ?>
				</div>
			</small>
		</td>
	</tr>
<?php endforeach; ?>
</table>

</div>

<div class="export">
	<p>エクスポートする文献を選択してください</p>

	<ul>
		<li><!-- // CSV形式でエクスポート -->
		<?php echo $form->submit(__('CSV(通常)形式でエクスポート', true), array("name" => "csv", "div" => false, "label" => false) ); ?>
		</li>
		<li><!-- // CSV形式でエクスポート -->
		<?php echo $form->submit(__('CSV(多国語対応)形式でエクスポート', true), array("name" => "utf", "div" => false, "label" => false) ); ?>
		</li>
		<li><!-- // BibTeX形式でエクスポート -->
		<?php echo $form->submit(__('BibTeX形式でエクスポート', true), array("name" => "bibtex", "div" => false, "label" => false) ); ?>
		</li>
		<br />
		<li><a href="#" onclick="history.back(); return false">戻る</a></li>
	</ul>
</div>

<?php echo $form->end(); ?>